<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>마이홈 top 영역</title>
<style>
#top_sub1,#top_sub2,#top_sub3,#top_sub4{
	text-decoration: none;
	font-size:12px;
	font-weight:bold;
	color:#223377;

}
#top_sub1:hover,#top_sub2:hover,#top_sub3:hover,#top_sub4:hover{
	color:#990000;
}
#top_div{
/* 	height:20px; */
	text-align:right;
	width:100%;
/* 	background-color: #556655; */
}
#top_div, #top_login{
	display:inline-block;
}
#top_div{
	
}
</style>
<script>
function getId(id){ return document.getElementById(id);}

function init(){
	if(getId('btnLogin') != null){
		getId('btnLogin').onclick = function(){
			location.href = 'index.jsp?inc_content=login.jsp';
		}
	}
	
	if(getId('btnLogout') != null){
		getId('btnLogout').onclick = function(){
			location.href = 'index.jsp?inc_content=logout.jsp';
		}
	}
	getId('btnJoin').onclick = function(){
		location.href = 'index.jsp?inc_content=join.jsp';
	}
}
</script>

</head>
<body>
<%
//로그인 정보가 기억되어 있는 세션정보를 취득
String sessionID = (String)session.getAttribute("mid");
%>


<div id='top_div'>
	<div id='top_login'>
<!-- 		<a href='index.jsp'>HOME</a> /
		<a href='#'>MY PAGE</a> / -->
		<a id='top_sub1' href='index.jsp?inc_content=none.jsp'>HOME</a> /
		<a id='top_sub2' href='#'>고객센터</a> /
		<a id='top_sub3' href='index.jsp?inc_left=./board/board_list.jsp&inc_content=./board/list.jsp'>Community</a> /
		<a id='top_sub4' href='index.jsp?inc_content=./guest/g_list.jsp'>방명록</a> /
		
		<%
		if(sessionID == null || sessionID == ""){
		%>
			<input type='button' value='로그인' id='btnLogin'>
			<input type='button' id='btnJoin' value='회원가입'>
		<%} else { %>
			<!-- 로그인 후 페이지 -->
			<%=sessionID %> 님 방가방가...
			<input type='button' value='로그아웃' id='btnLogout'>
		<%} %>		
	</div>
</div>
<script>init();</script>
</body>
</html>